cd "/Users/kevin/Dropbox/TZ ITNs"
set more off
set varabbrev off

use "constructed data/for_analysis.dta", clear

cd "/Users/kevin/Dropbox/TZ ITNs/plots"

foreach z in $zone2 {
reg village_chair post  if `z'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store `z'
}


coefplot (western, label("Western")) (northern, label("Northern")) (central, label("Central")) ///
(lake, label("Lake")) (eastern, label("Eastern")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("VC approval by zone") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "Western" .834 "Northern" 1 "Central" 1.166 "Lake" 1.332 "Eastern", labs(small)) legend(off) xtitle("Zone", size(medlarge))
graph save Graph "vc_by_zone.gph", replace
graph export vc_by_zone.pdf, as(pdf) replace

foreach z in $zone2 {
reg village_exec post  if `z'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store `z'
}


coefplot (western, label("Western")) (northern, label("Northern")) (central, label("Central")) ///
(lake, label("Lake")) (eastern, label("Eastern")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("VEO approval by zone") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "Western" .834 "Northern" 1 "Central" 1.166 "Lake" 1.332 "Eastern", labs(small)) legend(off) xtitle("Zone", size(medlarge))
graph save Graph "veo_by_zone.gph", replace
graph export veo_by_zone.pdf, as(pdf) replace

foreach z in $zone2 {
reg councillor post  if `z'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store `z'
}


coefplot (western, label("Western")) (northern, label("Northern")) (central, label("Central")) ///
(lake, label("Lake")) (eastern, label("Eastern")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("Councillor approval by zone") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "Western" .834 "Northern" 1 "Central" 1.166 "Lake" 1.332 "Eastern", labs(small)) legend(off) xtitle("Zone", size(medlarge))
graph save Graph "councillor_by_zone.gph", replace
graph export councillor_by_zone.pdf, as(pdf) replace

foreach z in $zone2 {
reg ward_exec post  if `z'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store `z'
}


coefplot (western, label("Western")) (northern, label("Northern")) (central, label("Central")) ///
(lake, label("Lake")) (eastern, label("Eastern")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("WEO approval by zone") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "Western" .834 "Northern" 1 "Central" 1.166 "Lake" 1.332 "Eastern", labs(small)) legend(off) xtitle("Zone", size(medlarge))
graph save Graph "weo_by_zone.gph", replace
graph export weo_by_zone.pdf, as(pdf) replace


foreach z in $zone2 {
reg mp post  if `z'==1 & period_90==1 &  omitperiod==0, r cluster(distcode)
estimates store `z'
}


coefplot (western, label("Western")) (northern, label("Northern")) (central, label("Central")) ///
(lake, label("Lake")) (eastern, label("Eastern")), keep(post) rename(post="treatment effect") ///
vertical graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))  ciopts(lcolor(black)) mcolor(black) ///
title("MP approval by zone") ylabel(-0.2(0.2)0.8) yscale(r(-0.2, 0.8)) ///
xlabel( .668 "Western" .834 "Northern" 1 "Central" 1.166 "Lake" 1.332 "Eastern", labs(small)) legend(off) xtitle("Zone", size(medlarge))
graph save Graph "mp_by_zone.gph", replace
graph export mp_by_zone.pdf, as(pdf) replace

graph combine "vc_by_zone.gph" "veo_by_zone.gph"  "councillor_by_zone.gph" "weo_by_zone.gph" "mp_by_zone.gph", ///
  rows(2) cols(3) subtitle(, color(black) fcolor(white) lcolor(white)) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))

